/*
 * Copyright 2010 Gaurav Saxena
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.gwtstructs.gwt.client.widgets.autocompleterTextbox;

/**
 * Data holder class for custom HTML suggestions
 * @author Gaurav Saxena
 *
 */
public interface ICustomSuggestion {
	/**
	 * Gets the string which is displayed as the suggestion. 
	 * @param index index at which the string in textbox is found in the value. This number is zero based. 
	 * This may be useful in case formatting of matched text needs to be changed (to say bold while unmatched 
	 * stays not bold)
	 * @param currentTextValue current text value in textbox
	 * @return
	 */
	public String getDisplayString(int index, String currentTextValue);
	/**
	 * Gets the value of the suggestion. This value is used for match finding and also, this value is populated
	 * in the textbox when its suggestion is selected
	 * @return filter key on which suggestions will be show / hide
	 */
	public String getValueString();
}
